package appapi.service.impl;

import appapi.dao.InterferenceMapper;
import appapi.entity.mqtt.Interference;
import appapi.service.InterferenceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version: java version 1.8
 * @Author: Ygp Work
 * @description:
 * @date: 2023-07-05 17:23
 */
@Service
public class InterferenceServiceImpl implements InterferenceService {
    @Autowired
    private InterferenceMapper interferenceMapper;

    @Override
    public void insertInterference(Interference interference) {
        interferenceMapper.insertInterference(interference);
    }

    @Override
    public void updateInterference(Interference interference) {
        interferenceMapper.updateInterference(interference);
    }

    @Override
    public void deleteInterference(Long id) {
        interferenceMapper.delInterference(id);
    }

    @Override
    public List<Interference> getInterferenceById(Long devicesId) {
        return interferenceMapper.getInterferenceById(devicesId);
    }

    @Override
    public List<Interference> getAllInterference(Interference interference) {
       return interferenceMapper.getAllInterference(interference);
    }
}
